package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.pojo.Student;
import com.itheima.service.SayHello;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class sayHello {
    @Reference
    private SayHello sayHello;

    @RequestMapping("/sayHello")
    public Student hello(Integer id){
        return sayHello.getStudent(id);
    }

}
